'use strict';

var cmsServices = angular.module('cmsServices');

cmsServices.factory('cmsService', ['$rootScope', '$http', 'Constant', function($rootScope, $http, Constant){
    return {

    };
}]);

cmsServices.factory('Nav', ['$rootScope', 'Constant', function($rootScope, Constant){
    return {
        preview: function() {
            $('#previewFrame').attr('src', Constant.ClientRoot + '?preview=true' + '#/'
                + $rootScope.CurrentAppId + '/' + $rootScope.CurrentSub.id);
        },
        refreshPreview: function() {
            document.getElementById('previewFrame').contentWindow.location.reload(true);
        }
    }
}]);
